﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Services;

public partial class scripts_Sessions : System.Web.UI.Page
{


    protected void Page_Load(object sender, EventArgs e)
    {

        if (Request.Params["Uri"] != null &&
            Request.Params["Country"] != null &&
            Request.Params["EmailAddress"] != null &&
            Request.Params["FirstName"] != null &&
            Request.Params["LastName"] != null &&
            //Request.Params["Sex"] != null &&
            Request.Params["Organization"] != null &&
            Request.Params["Purpose"] != null &&
            Request.Params["Title"] != null &&
            Request.Params["Id"] != null &&
            Request.Params["Username"] != null)
        {

            Session["Uri"] = Request.QueryString["Uri"];
            Session["Country"] = Request.QueryString["Country"];
            Session["EmailAddress"] = Request.QueryString["EmailAddress"];
            Session["FirstName"] = Request.QueryString["FirstName"];
            Session["LastName"] = Request.QueryString["LastName"];
            //Session["Sex"] = Request.QueryString["Sex"];
            Session["Organization"] = Request.QueryString["Organization"];
            Session["Purpose"] = Request.QueryString["Purpose"];
            Session["Title"] = Request.QueryString["Title"];
            Session["Id"] = Request.QueryString["Id"];
            Session["Username"] = Request.QueryString["Username"];

            Session["isLogin"] = true;

            var res = Session["Uri"] + "," + Session["Country"] + "," + Session["EmailAddress"] + "," +
                Session["FirstName"] + "," + Session["LastName"]  + "," + Session["Organization"] + "," +
                Session["Purpose"] + "," + Session["Title"] + "," + Session["Id"] + "," + Session["Username"];
            Response.Write(res.ToString());
        }
    }
}